﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsAppBoss
{
    internal class Constants
    {
        public class DirectoryNames
        {
            public const string Name = @"Packages";                         // Contains app packages
            public const string LocalState = @"LocalState";                 // Contains files inside app data
            public const string Settings = @"Settings";                     // Contains settings inside app data
            public const string WindowsAppBoss = @"WindowsAppBoss";         // Contains user data for this application
            public const string SnapShots = @"SnapShots";                   // Contains snap shots for this application
            public const string Logs = @"Logs";                             // Contains log files generated by this application
            public const string PackageMetadata = @"microsoft.system.package.metadata";         // Path to the secret OEM preload folder
            public const string WindowsApps = @"WindowsApps";               // Directory containing windows apps in program files

            public static readonly string LogDirectory = System.IO.Path.Combine(
                Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
                Constants.DirectoryNames.WindowsAppBoss,
                Constants.DirectoryNames.Logs);
        }

        public class FileNames
        {
            public const string PackageFileExtension = ".appx";
            public const string Settings = "settings.dat";
            public const string SettingsFileExtension = ".dat";
            public const string AppxFileSelectionFilter = @"App Files (*.appx)|*.appx|All Files (*.*)|*.*";
            public const string LicenseFileSelectionFilter = @"License Files (*.xml)|*.xml|All Files (*.*)|*.*";
            public const string CustomData = @"custom.data";       // Filename of the custom.data
            public const string DismLog = @"dism.log";
            public const string AppxManifest = @"AppxManifest.xml";
            public const string PathToDism = @"System32\Dism.exe"; // From WinDir (needs to be sysnativ\Dism.exe sometimes)
        }

        public class Urls
        {
            public const string DeveloperLicenseAbout = @"http://msdn.microsoft.com/en-us/library/windows/apps/hh974578.aspx";
            public const string AppHomePage = @"https://windowsappboss.codeplex.com";
        }

        public class RegistryKeys
        {
            public const string PathToEnableSideLoading = @"Software\Policies\Microsoft\Windows\Appx\";
            public const string PathToActivatableClassServer = @"ActivatableClasses\Package\{0}\Server\"; // 0 = package family name
        }

        public class RegistryValues
        {
            public const string AllowAllTrustedApps = @"AllowAllTrustedApps";
            public const string AppUserModelId = @"AppUserModelId";
        }

        public class Strings
        {
            public const string RunningAsAdministrator =  " (Administrator)";

        }
    }
}
